[#macro shopShowView]
<div class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="1">
            商家详情
        </el-menu-item>
        <el-menu-item index="2">
            商家二维码
        </el-menu-item>
        <el-menu-item index="3">
            商家资金流水
        </el-menu-item>
        <el-menu-item index="4">
            营业时间
        </el-menu-item>
        <el-menu-item index="5">
            员工管理
        </el-menu-item>
        <el-menu-item index="6">
          微信通知者
        </el-menu-item>
    </el-menu>
    <div>
        <router-view></router-view>
    </div>

</div>
[/#macro]
[#macro shopShowConfig]
<script type="text/x-template" id="my-shop-show">
    [@shopShowView /]
</script>
<script type="text/javascript">
    //显示组件开始
    var shopShowConfig = {};
    shopShowConfig.template = "#my-shop-show";
    shopShowConfig.methods = config.basicMethod();
    shopShowConfig.data = function () {
        return {
            viewModel: {
            },
            activeIndex: "1"
        }
    };

    shopShowConfig.methods.handleSelect = function (index) {
        console.log(index)
        var selectId = this.selectId;
        if (index == "1") {
            this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
        }
        else if (index == "2") {
            this.$router.replace({ path: '/view/code', query: { id: selectId, activeIndex: 2, time: Math.random() } })
        } else if (index == "3") {
            this.$router.replace({ path: '/view/stream', query: { id: selectId, activeIndex: 3, time: Math.random() } })
        } else if (index == "4") {
            this.$router.replace({ path: '/view/hour', query: { id: selectId, activeIndex: 4, time: Math.random() } })
        } else if (index == "5") {
            this.$router.replace({ path: '/view/staff', query: { id: selectId, activeIndex: 5, time: Math.random() } })
        }else if (index == "6") {
            this.$router.replace({ path: '/view/notifier', query: { id: selectId, activeIndex: 6, time: Math.random() } })
        } else {

        }
    };

    shopShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var activeIndex = this.$route.query.activeIndex;

        var self = this;
        var data = {};
        data.id = id;
        this.selectId = data.id;
        if (activeIndex) {
            this.activeIndex = activeIndex;
        }
    }
    var shopShowView = Vue.component('my-shop-view', shopShowConfig);
		//显示组件结束
</script>
[/#macro]



[#macro childShopView]
<div>
    <el-form class="viewForm" label-width="80px">
        <el-col :span="24">
            <el-form-item label="门头">
                <div v-html="viewModel.logo">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="商家名称">
                <div v-html="viewModel.name">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="所属分类">
                <div v-html="viewModel.shopCatalogName">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="排序号">
                <div v-html="viewModel.sortNum">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="老板">
                <div v-html="viewModel.bossName">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="地址">
                <div v-html="viewModel.address">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="客服电话">
                <div v-html="viewModel.tel">></div>
            </el-form-item>
        </el-col>
    </el-form>
</div>
[/#macro]

[#macro childShopConfig]
<script type="text/x-template" id="child-shop-show">
        [@childShopView /]
    </script>
<script type="text/javascript">

    var childShopShowConfig = {};
    childShopShowConfig.template = "#child-shop-show";
    childShopShowConfig.methods = config.basicMethod();
    childShopShowConfig.data = function () {
        return {
            viewModel: {
            }
        }
    };
    childShopShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var self = this;
        var data = {};
        data.id = id;
        this.postData("${siteurl}tenantRest/shop/view.htm", data, function (res) {
            if (res.code == 0) {
                self.viewModel = res;

            }
        });
    }
    var childShopShowView = Vue.component('child-shop-show', childShopShowConfig);
</script>
[/#macro]